package Graphic;

import java.util.logging.Logger;

/**
 *
 * @author DEX
 */

public class ThreadedDialogBox extends Thread{

        private String text;
        private Boolean chiudo;
        Logger logger = Logger.getLogger(this.getClass().getSimpleName());


        public ThreadedDialogBox(String text, Boolean chiudo) {
                this.text = text;
                this.chiudo = chiudo;
        }


        public void run() {
                try{
                    if(chiudo){
                        DialogBoxExit dbe = new DialogBoxExit();
                        dbe.message(text);
                    }
                    else{
                        DialogBox db = new DialogBox();
                        db.message(text);
                    }
                }
                catch(Exception e){
                    logger.warning("[ThreadedDialogBox] exception caught");
                    e.printStackTrace();
                    }
        }
}

